package com.study.it.dao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;


public interface BaseDao<T> {
	   public void refresh(T g);
	
	   public void insert(T g);
	   public void update(T g);
	   public void delete(Serializable id);
	   public void delete(T g);
	   
	   public T loadOne(Serializable id);//延迟加载获取单个
	   public T selectOne(Serializable id) ;
	   public T selectOne(DetachedCriteria dc);//根据条件查一个
	   public Object selectSingle(DetachedCriteria dc);//根据条件查单值
	   
	   public List<T> selectList();
	   public List<T> selectList(boolean isCache);
	   public List<T> selectList(DetachedCriteria dc);//根据条件查一组
	   public List<T> selectList(DetachedCriteria dc, boolean isCache);
	   public List<T> selectList(DetachedCriteria dc, int start, int row);
	   public List<T> selectList(DetachedCriteria dc, int start, int row, boolean isCache);
	   public List<T> selectList(String hql, Object[] objects);
	   
	   
}




